package com.arpa.wms.domain.entity;

import java.math.BigDecimal;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.Digits;

/**
 * <p>
 * 积分兑换商品
 * </p>
 *
 * @author wangdong
 * @since 2021-07-03
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("wms_points_exchange_goods")
@ApiModel(value="PointsExchangeGoods对象", description="积分兑换商品")
public class PointsExchangeGoods extends BasicEntity {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "商品标识")
    @TableField("code")
    private String code;

    @ApiModelProperty(value = "所属机构")
    @TableField("group_code")
    private String groupCode;

    @ApiModelProperty(value = "商品名称")
    @TableField("name")
    @Length(max = 100, message = "商品名称长度不能大于100", groups = {Save.class,Update.class})
    private String name;

    @ApiModelProperty(value = "消耗积分")
    @TableField("points")
    @Digits(integer = 20,fraction = 6, groups = {Save.class,Update.class})
    private BigDecimal points;

    @ApiModelProperty(value = "状态：0停用，1启用")
    @TableField("status")
    private String status;

    @ApiModelProperty(value = "删除标记")
    @TableField("is_deleted")
    private Integer isDeleted;


    public interface Save {

    }

    public interface Update {

    }

}
